home *** CD-ROM | disk | FTP | other *** search
/ Building Homes of Our Own / Building Homes of our Own.iso / setup / data1.cab / Everything / working / houCons.dxr / interface_6_totalTileManager.ls < prev    next >
Encoding:
Text File  |  2002-09-25  |  518 b   |  25 lines

  1. property ancestor
  2.  
  3. on new me
  4.   global gIso
  5.   ancestor = gIso
  6.   return me
  7. end
  8.  
  9. on getNumTilesInHouse
  10.   totaltiles = 0
  11.   repeat with x = 1 to ancestor.pwide
  12.     repeat with y = 1 to ancestor.ptall
  13.       if ancestor.mastergrid[x][y][#FP1] <> #NODRAW then
  14.         totaltiles = totaltiles + 1
  15.       end if
  16.       if ancestor.pTotalFloors = 2 then
  17.         if ancestor.mastergrid[x][y][#FP2] <> #NODRAW then
  18.           totaltiles = totaltiles + 1
  19.         end if
  20.       end if
  21.     end repeat
  22.   end repeat
  23.   return totaltiles
  24. end
  25.